#include <triggle.h>
#include <timer.h>
#include <asm/armlocal_register.h>
#include <io.h>
#include <triggle.h>


static void arch_irq_handle(){

	unsigned int irq = readl(ARM_LOCAL_IRQ_SOURCE0);

    printk(" irq --------------1");
    
	switch (irq) {
	case (CNT_PNS_IRQ):
		handle_pns_irq();
		break;
	default:
		printk("Unknown pending irq: %x\r\n", irq);
	}
}

void irq_handle (){
    /*
    unsigned int req = readl(ARM_LOCAL_IRQ_SOURCE0);

    switch(req){
        case (CNT_PNS_IRQ):
            handle_pns_irq();
            break;
        default:
            printk("unknown irq : %x\n",req);
    }
    */

   __irq_enter();
   
   arch_irq_handle();
   __irq_exit();

}


    